SpatialStream® Code Examples

Basic Geocode Call

The GetGeocode functional component calls the SpatialStream® interactive geocoding engine which gives
Parcel level results where available and allows you to specify the result returned.

This example shows how to construct a GetGeocode query where address, city, state, and zipcode are passed in
and the point location is requested in return. GetGeocode will attempt to return the location
specified parcel center point and will cascade to less accurate locations should the requested
location accuracy not be available. In addition to the location latitude and longitude values, GetGeocode
also returns a score from 1 to 100 indicating the match quality of the geocode result.

GetGeocode

var url = "GetGeocode.aspx?";

url += "&address=" + document.getElementById("address").value;
url += "&city=" + document.getElementById("city").value;
url += "&state=" + document.getElementById("state").value;
url += "&zip=" + document.getElementById("zip").value;
url += "&datasource=PARCELS,STREET_CENTERLINE,POSTAL_CENTROID";
Dmp.Env.Connections["SS"].getJson(url, success, failure);


Run Sample   Back To Index